package com.weixing.mall.provider.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.weixing.mall.provider.mapper.StockCheckProductPersonMapper;
import com.weixing.mall.provider.model.domain.StockCheckProductPerson;
import com.weixing.mall.provider.service.IStockCheckProductPersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 盘点单商品关联盘点人表 服务实现类
 * </p>
 *
 * @author Small
 * @since 2019-11-15
 */
@Service
public class StockCheckProductPersonServiceImpl extends ServiceImpl<StockCheckProductPersonMapper, StockCheckProductPerson> implements IStockCheckProductPersonService {


    @Autowired
    private  StockCheckProductPersonMapper  stockCheckProductPersonMapper;
    @Override
    @Transactional(rollbackFor=Exception.class)
    public void finish(StockCheckProductPerson entity) {
        //先结束个人盘点
        stockCheckProductPersonMapper.finish(entity.getStockPerson(),entity.getIsFinish(),entity.getCheckProduct());
    }
}
